<!DOCTYPE html><!--suppress ALL-->
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>thymeleaf 模板引擎</title>
    <meta name="keywords" content="关键字">
    <meta name="description" content="简介">
</head>

<body>
<h3>[[${2*3}]]</h3>
<p class="tt"></p>
<button class="btn1">fetch get</button>
<button class="btn2">fetch post</button>
<button class="btn3">fetch put</button>

<script>
    let ttt = document.querySelector(".tt")
    function t(){
        fetch("/timer").then(res=>res.text()).then(res=>{
            ttt.innerHTML = res
        }).catch(err=>console.log(err))
    }
    t();
    setInterval(t,1000)
</script>
</body>
</html>
